<?php
namespace app\customer\model;

use app\BaseModel;

class LongbingCardAnswer extends BaseModel
{
    //定义表名称
    protected $name = 'longbing_card_qn_answer';
    
    public function searchAnswerAttr($query, $value, $data)
    {
        $query->where('answer','like', '%' . $value . '%');
    }
    public function getAnswer($filter)
    {
        $result = $this->where($filter)->find();
        if(!empty($result)) $result = $result->toArray();
        return $result;
    }
    public function listAnswer($filter)
    {
        $result = $this->where($filter)->select();
        if(!empty($result)) $result = $result->toArray();
        return $result;
    }
}